package com.heima.article.fegin;

import com.heima.article.dto.ArticleDto;
import com.heima.article.entity.ApAuthor;
import com.heima.common.dto.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author xingsong
 * @Date 2022/7/28 20:31
 * @PackageName: com.heima.article.fegin
 * @ClassName: ArticalFegin
 * @Description: TOOD
 * @Version 1.0
 */
@FeignClient(value = "leadnews-article")
public interface ArticalFegin {

    @PostMapping("/api/v1/author")
    public ResponseResult<ApAuthor> saveApAuthor(@RequestBody ApAuthor apAuthor);

    /**
     * 保存/更新 文章
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/article")
    public ResponseResult<Long> saveArticle(@RequestBody ArticleDto dto);
}
